
<!--
 * @Description: 
 * @Author: charles
 * @Date: 2021-05-05 22:02:56
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-12-22 17:14:49
-->
<template>
  <div ref="right2_container" style="height:95%"> </div>
</template>

<script>
import { Line } from '@antv/g2plot';
export default {
  mounted() {
    this.initChart()
  },
  methods:{
    initChart(){
const data = [
  { year: '2019-03', value: 3 },
  { year: '2019-04', value: 4 },
  { year: '2019-05', value: 3 },
  { year: '2019-06', value: 5 },
  { year: '2019-07', value: 4 },
  { year: '2019-08', value: 6 },
  { year: '2019-09', value: 7 },
  { year: '2019-10', value: 9 },
  { year: '2019-11', value: 13 },
  { year: '2019-11', value: 8 },
];
const linePlot = new Line(this.$refs.right2_container, {
  data,
  xField: 'year',
  yField: 'value',
  stepType: 'vh',
});

linePlot.render();
    } 
  }
}
</script>
